package com.example.texted.callable;

import java.util.concurrent.*;

public class Do {
    public static void main(String[] args) throws InterruptedException, ExecutionException {
        ExecutorService executorService = Executors.newSingleThreadExecutor();
        Future<Integer> future = executorService.submit(new TaxCalculator(100));
        while (!future.isDone()) {
            TimeUnit.MILLISECONDS.sleep(200);
            System.out.print("#");
        }
        System.out.println();
        System.out.println(future.get());
        executorService.shutdown();
    }
}
